package com.taotao.wjspringboot.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

/**
 * @author wangjin
 * @title: SpringMVCConfig
 * @projectName wj-springboot
 * @description:
 * @date 2021/10/23 16:57
 */
@Configuration
@EnableWebMvc
@ComponentScan("com.taotao.wjspringboot.*")
public class SpringMVCConfig {
    @Bean
    public StringHttpMessageConverter stringHttpMessageConverter() {
        return new StringHttpMessageConverter();
    }

    @Bean
    public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() {
        return new MappingJackson2HttpMessageConverter();
    }
}
